import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Hottop from '../views/Hottop.vue'
import Sousuo from '../views/Sousuo.vue'
import PlayerS from '../components/hottop/PlayerS.vue'

import playlistdetail from '../components/playlistdetail/playlistdetail.vue'
import Player from '../components/player/Player.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      showTab:true
    }
  },
  {
    path: '/hottop',
    name: 'Hottop',
    component:Hottop,
    meta:{
      showTab:true
    }
  },
  {
    path: '/sousuo',
    name: 'Sousuo',
    component: Sousuo,
    meta:{
      showTab:true
    }
  },
  {
    path: '/playerS/:id',
    name: 'PlayerS',
    component: PlayerS,
    meta:{
      showTab:false
    }
  },{
    path:'/playlistdetail/:id',
    name:'playlistdetail',
    component:playlistdetail,
    meta:{
      showTab:false
    }
  },{
    path:'/player/:id',
    name:'Player',
    component:Player,
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
